package com.bss.dao;

import java.util.List;

import org.springframework.stereotype.Repository;

import com.andy.basics.Dao;
import com.bss.model.PaymentType;

@Repository
public class PaymentTypeDao extends Dao<PaymentType> {

	public boolean isRefundable(final String paymentTypeName) {
		List<PaymentType> types = find("name='" + paymentTypeName + "'");
		if (types == null || types.size() == 0) {
			return false;
		}
		return types.get(0).isRefundable();
	}

}
